import type { Config } from "@/utils/request";
import { request } from "@/utils/request";

export interface WallNewsDetail {
  _id: string;
  view_count: number;
  publish_date: number;
  article_status: number;
  title: string;
  author: string;
  content: string;
  select: boolean;
}

export const apiWallNewsDetail = (data: { id: string }) => {
  return request<WallNewsDetail>("/wallNewsDetail", {
    data,
    catch: () => {
      return {
        data: {
          author: "全部",
          _id: "222",
          select: true,
          title: "1111111",
          content: "<p>123123123123123</p>",
          article_status: 0,
          publish_date: Date.now(),
          view_count: 5,
        },
        errCode: 0,
        errMsg: "",
      };
    },
  });
};
